import {pget, ppostJson} from '@/utils/req'
import {modalApi} from '@/utils/modalReq'

/** 获取库位档案列表 */
export function getAmcparkingstorageList(query?: any) {
	return pget(`${modalApi.storage}/amcparkingstorage/list`, query)
}

/** 修改库位档案 */
export function editAmcparkingstorage(data: any) {
	return ppostJson(`${modalApi.storage}/amcparkingstorage/save`, data)
}

/** 查看库位档案详情 */
export function amcparkingstorageInfo(id: string) {
	return pget(`${modalApi.storage}/amcparkingstorage/detail/${id}`)
}

/** 获取停车场下全部的空闲车位 */
export function getFreeStoreList(query?: any) {
	return pget(`${modalApi.storage}/amcparkingstorage/getFreeStoreList`, query)
}

/** 获取停车场费用结算列表 */
export function getParkingfeesettlementList(query?: any) {
	return pget(`${modalApi.storage}/parkingfeesettlement/list`, query)
}

/** 新增停车场费用结算 */
export function addParkingfeesettlement(data: any) {
	return ppostJson(`${modalApi.storage}/parkingfeesettlement/save`, data)
}

/** 修改停车场费用结算 */
export function editParkingfeesettlement(data: any) {
	return ppostJson(`${modalApi.storage}/parkingfeesettlement/update`, data)
}
/** 修改实际费用、审核状态等 */
export function editParkingfeesettlementSubmit(data: any) {
	return ppostJson(`${modalApi.storage}/parkingfeesettlement/submit`, data)
}

/** 查看停车场费用结算详情 */
export function parkingfeesettlementInfo(id: string) {
	return pget(`${modalApi.storage}/parkingfeesettlement/detail/${id}`)
}

/** 根据停车场id查询费用模式 */
export function getCostTypeList(query?: any) {
	return pget(
		`${modalApi.storage}/warehouseparkingrules/getCostTypeList`,
		query,
	)
}

/** 获取仓库所有车型 */
export function getCarModelList(query?: any) {
	return pget(
		`${modalApi.storage}/warehouseinoutgoods/getCarModelList`,
		query,
	)
}
/** 创建停车场费用结算单-车辆费用统计分页 */
export function getVehicleCostStatisticsList(query?: any) {
	return ppostJson(`${modalApi.storage}/parkingfeesettlement/page`, query)
}

/** 获取导入失败列表 */
export function getSupplierBaseExcelList(query?: any) {
	return pget(`${modalApi.supplier}/supplierbidding/getBiddingExcel`, query)
}

/** 保存库位导入数据 */
export function getImportStorageData(query?: any) {
	return pget(
		`${modalApi.storage}/amcparkingstorage/importStorageData`,
		query,
	)
}
